The present invention relates to cloud computing, and more specifically, to a method and apparatus for deploying a virtual machine in a computing environment including a plurality of nodes.
At present, a cloud service can be provided for a customer through a cloud computing environment (also known as a cloud computing platform or a cloud service platform). The cloud computing environment includes a plurality of nodes (or referred to as cloud computing nodes or cloud service nodes), each of which has physical resources, such as a central processing unit (CPU), a memory, a disk and so on. When the customer needs the cloud service; i.e., when the customer needs to use computing resources of the cloud computing environment, the customer sends a request to deploy a virtual machine which will be configured with the computing resources. In response to the request, physical resources on a certain node in the cloud computing environment are configured in order to deploy the virtual machine on the node, and then the virtual machine is provided for the customer. Since the cloud computing environment includes the plurality of nodes, and each of the nodes has a different resource usage status, a problem to be solved in the above virtual machine deployment process is how to know resource requirement features of the virtual machine to be deployed at runtime in a predictable manner so as to reasonably select the node on which the virtual machine is deployed, so that a throughput of the cloud computing environment is optimized while providing a good service experience for the customer.
A variety of approaches for selecting a node on which a virtual machine is to be deployed have been proposed. For example, one of the approaches is a Round Robin method, in which virtual machines for customers are deployed in turn on all available nodes in the cloud computing environment in a round robin fashion. Another approach is a Simple Greedy method, in which the virtual machines for customers are always deployed on a same one node until available resources on the node are exhausted. However, all these approaches select the node based on static configuration information at the time of deployment of the virtual machine, rather than based on resource requirement features of the virtual machine at runtime. Specifically, the amounts of resources consumed at runtime (namely, runtime resource requirements) of virtual machines for different customers and different application scenarios vary with specific usage scenarios of the customers dynamically, thus the virtual machines have different resource requirement features. However, when selecting the node on which the virtual machine is deployed, the above two approaches merely take into account the initial static resource requirements of the virtual machine, i.e., the resource requirements determined when the request is sent, but fail to take into account the dynamic runtime resource requirements of the virtual machine. Since the initial static resource requirements of the virtual machine is often different from the runtime resource requirement thereof, in some cases the node selected by the two approaches can not meet the runtime resource requirements of the virtual machine, which renders that the throughput of the cloud service system decreases and the user experience is deteriorated.